<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            position: absolute;
            border: 1px solid;
        }
        #box1{
            width: 400px;
            height: 400px;
            background: palegreen;
        }
        #box2{
            width: 200px;
            height: 200px;
            left: 100px;
            top: 100px;
            background: palevioletred;
        }
        #box3{
            width: 100px;
            height: 100px;
            left: 50px;
            top: 50px;
            background: rosybrown;
        }
    </style>
    <script src="../util.js"></script>
</head>
<body>
    <div id="box1">
        <div id="box2">
            <div id="box3"></div>
        </div>
    </div>
    <script>
        var divs = document.querySelectorAll('div')
        console.log(utils.getBodyPos(divs[2]))
    </script>
</body>
</html>